home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / complib / claev2.z / claev2
Text File  |  1998-10-30  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4. CCCCLLLLAAAAEEEEVVVV2222((((3333FFFF))))                                                          CCCCLLLLAAAAEEEEVVVV2222((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      CLAEV2 - compute the eigendecomposition of a 2-by-2 Hermitian matrix  [ A
  10.      B ]  [ CONJG(B) C ]
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE CLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
  14.  
  15.          REAL           CS1, RT1, RT2
  16.  
  17.          COMPLEX        A, B, C, SN1
  18.  
  19. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  20.      CLAEV2 computes the eigendecomposition of a 2-by-2 Hermitian matrix
  21.         [  A         B  ]
  22.         [  CONJG(B)  C  ].  On return, RT1 is the eigenvalue of larger
  23.      absolute value, RT2 is the eigenvalue of smaller absolute value, and
  24.      (CS1,SN1) is the unit right eigenvector for RT1, giving the decomposition
  25.  
  26.      [ CS1  CONJG(SN1) ] [    A     B ] [ CS1 -CONJG(SN1) ] = [ RT1  0  ] [-
  27.      SN1     CS1     ] [ CONJG(B) C ] [ SN1     CS1     ]   [  0  RT2 ].
  28.  
  29.  
  30. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  31.      A      (input) COMPLEX
  32.             The (1,1) element of the 2-by-2 matrix.
  33.  
  34.      B      (input) COMPLEX
  35.             The (1,2) element and the conjugate of the (2,1) element of the
  36.             2-by-2 matrix.
  37.  
  38.      C      (input) COMPLEX
  39.             The (2,2) element of the 2-by-2 matrix.
  40.  
  41.      RT1    (output) REAL
  42.             The eigenvalue of larger absolute value.
  43.  
  44.      RT2    (output) REAL
  45.             The eigenvalue of smaller absolute value.
  46.  
  47.      CS1    (output) REAL
  48.             SN1    (output) COMPLEX The vector (CS1, SN1) is a unit right
  49.             eigenvector for RT1.
  50.  
  51. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  52.      RT1 is accurate to a few ulps barring over/underflow.
  53.  
  54.      RT2 may be inaccurate if there is massive cancellation in the determinant
  55.      A*C-B*B; higher precision or correctly rounded or correctly truncated
  56.      arithmetic would be needed to compute RT2 accurately in all cases.
  57.  
  58.      CS1 and SN1 are accurate to a few ulps barring over/underflow.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCLLLLAAAAEEEEVVVV2222((((3333FFFF))))                                                          CCCCLLLLAAAAEEEEVVVV2222((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      Overflow is possible only if RT1 is within a factor of 5 of overflow.
  75.      Underflow is harmless if the input data is 0 or exceeds
  76.         underflow_threshold / macheps.
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.